@using BlazorApp.Pages.Common.Html.HTable
@using BlazorApp.Pages.Common.Metadata
@using BlazorApp.Pages.Event
@inherits BlazorApp.Pages.Common.DrawerPageBase<k8s.Models.V1Lease>
@if (Lease != null)
{
    <LeaseAction Item="Lease" MenuMode="MenuMode.Horizontal"></LeaseAction>
    <Divider Orientation="left" Style="font-weight:bold">@L["Metadata"]</Divider>
    <MetadataView Item="Lease.Metadata" ExplainFieldPrefix="lease"></MetadataView>
    <Divider Orientation="left" Style="font-weight:bold">@L["Spec"]</Divider>
    <HTable Bordered Column="1">
        <PropertySimpleView Title=@L["AcquireTime"] Item="@Lease.Spec.AcquireTime?.ToLocalTime()"
                            ExplainField="lease.spec.acquireTime">
        </PropertySimpleView>
        <PropertySimpleView Title=@L["HolderIdentity"] Item="@Lease.Spec.HolderIdentity"
                            ExplainField="lease.spec.holderIdentity">
        </PropertySimpleView>
        <PropertySimpleView Title=@L["LeaseDurationSeconds"] Item="@Lease.Spec.LeaseDurationSeconds"
                            ExplainField="lease.spec.leaseDurationSeconds">
        </PropertySimpleView>
        <PropertySimpleView Title=@L["LeaseTransitions"] Item="@Lease.Spec.LeaseTransitions"
                            ExplainField="lease.spec.leaseTransitions">
        </PropertySimpleView>
        <PropertySimpleView Title=@L["RenewTime"] Item="@Lease.Spec.RenewTime?.ToLocalTime()"
                            ExplainField="lease.spec.renewTime">
        </PropertySimpleView>
    </HTable>
    <MiniEventListView Uid="@Lease.Metadata.Uid"></MiniEventListView>
}
